package cn.dzz.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.ValueStack;

/**
 * @author Echo42
 * @file Struts2
 * @create 2020年08月29日19:02
 */
public class ValueStackAction extends ActionSupport {

    @Override
    public String execute() throws Exception {

        ActionContext context = ActionContext.getContext();

        ValueStack valueStack01 = context.getValueStack();
        ValueStack valueStack02 = context.getValueStack();

        System.out.println("valueStackInstance is Singleton ? -> " + (valueStack01 == valueStack02));

        return super.execute();
    }
}
